package com.bgds.sys.config.interceptor.web;

import com.bgds.sys.common.utils.HexUtil;
 import java.io.UnsupportedEncodingException;
 import java.security.*;
 import java.security.spec.InvalidKeySpecException;
 import java.security.spec.PKCS8EncodedKeySpec;
 import java.security.spec.X509EncodedKeySpec;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
/**
 * @Description
 * @Author lj
 * @create: 2020-08-06 15:47
 */
public class AuthConfig {


    private static final String DSA = "DSA";
    private static SimpleDateFormat CRED_TIME_FORMAT =new SimpleDateFormat("yyyyMMddHHmm");
    private static String CRED_SEPERATOR =":";
    private static String signatureAlg ="SHA1WithDSA";
    private static String SELF_PROJECTENAME ="A";

    private static String privateKeyStr = "3082014b0201003082012c06072a8648ce3804013082011f02818100fd7f53811d75122952df4a9c2eece4e7f611b7523cef4400c31e3f80b6512669455d402251fb593d8d58fabfc5f5ba30f6cb9b556cd7813b801d346ff26660b76b9950a5a49f9fe8047b1022c24fbba9d7feb7c61bf83b57e7c6a8a6150f04fb83f6d3c51ec3023554135a169132f675f3ae2b61d72aeff22203199dd14801c70215009760508f15230bccb292b982a2eb840bf0581cf502818100f7e1a085d69b3ddecbbcab5c36b857b97994afbbfa3aea82f9574c0b3d0782675159578ebad4594fe67107108180b449167123e84c281613b7cf09328cc8a6e13c167a8b547c8d28e0a3ae1e2bb3a675916ea37f0bfa213562f1fb627a01243bcca4f1bea8519089a883dfe15ae59f06928b665e807b552564014c3bfecf492a04160214480b402211d6f71c939c16e4729d8bc1e6db686f";
    private static String publicKeyStr =  "308201b83082012c06072a8648ce3804013082011f02818100fd7f53811d75122952df4a9c2eece4e7f611b7523cef4400c31e3f80b6512669455d402251fb593d8d58fabfc5f5ba30f6cb9b556cd7813b801d346ff26660b76b9950a5a49f9fe8047b1022c24fbba9d7feb7c61bf83b57e7c6a8a6150f04fb83f6d3c51ec3023554135a169132f675f3ae2b61d72aeff22203199dd14801c70215009760508f15230bccb292b982a2eb840bf0581cf502818100f7e1a085d69b3ddecbbcab5c36b857b97994afbbfa3aea82f9574c0b3d0782675159578ebad4594fe67107108180b449167123e84c281613b7cf09328cc8a6e13c167a8b547c8d28e0a3ae1e2bb3a675916ea37f0bfa213562f1fb627a01243bcca4f1bea8519089a883dfe15ae59f06928b665e807b552564014c3bfecf492a038185000281810097a59a51837bdfa80bf5a00ee10e02a0aa37740a3ca8c55842bcba68cc6d108cb2ee5cad403bf87d047187b8816b71b0ed635fbae13a052df56d97c8ab339d84256a8a89f6dcc34198f89e7ee64b123c2887261c945d5a3c9a71d7eb90cdddfa5b7a4ed24350cc1424365b05150faf8106e04ed770a35af203694a4b514881dc";

//    1、外部系统获取到一下url格式的登录请求：
//    http://127.0.0.1:8080/hbtrust-dam/web/XSHB0301?p_username=li_xiang&p_password=<%=str.toString()%>&p_authen=Trust
//    2、改造登录认证过滤器，校验request中p_authen是否为Trust，如果是，则校验p_password是否正确。
//    解析加密密钥部分







}
